from main.model.logic.software.program import Program
from main.model.logic.software.instructions import Compare

class ProgramBuilder(object):
    
    def __init__(self):
        self.__instructions = []
        self.__name = "builder_name"
        
    def with_defaults(self, amount):
        for _ in range(0, amount):
            self.__instructions.append(Compare([]))
        return self
    
    def build(self):
        program = Program(self.__name)
        for instruction in self.__instructions:
            program.add(instruction)
        return program